<?php

//赋值运算符
$name = 'php';

$title = "php\n 7.2";
$title2 = 'php\n 7.2';

echo "<pre>";
var_dump($title,$title2);
echo "</pre>";

$output = `git`;
echo "<pre>$output</pre>";
//.连接两个字符串
$a = "The People's " . "Republic of china ";
var_dump($a);
//if的使用
echo "<pre>";
$b = 1;
$c = 2;
if($b < $c)
{
    echo "<br>" . "a is bigger than b";
}
else
{
    echo "b is bigger than a";
}
echo "</pre>";

//定义函数<p>与</p>是对于echo的换行，而var_dump<pre>与</pre>
function p($value = '')
{
    echo "<pre>";
    var_dump($value);
    echo "</pre>";
}
p(1);
//数组
$a1 = array('name' => 'DengTianJin' , 'age' => 42, 'salary' => 30000000000);
p($a1);

//遍历数组
foreach($a1 as $key => $value)
{
    echo "Current value of \a1: $key.\n";
    echo "<br>";
}
?>
